Gearswap Support Thread

Language: JP EN DE FR
2010-09-08
New Items
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 109 110 111 ... 182 183 184
 Ragnarok.Aramakii
Offline
Server: Ragnarok
Game: FFXI
user: Relapse13
Posts: 4
By Ragnarok.Aramakii 2016-09-10 23:18:38
Link | Quote | Reply
 
Oh man, I wasn't aware of that(obviously) lol. That definitely makes it a lot easier to understand

I just got around to pasting your rules into the lua, everything is working as intended now! You have no idea how grateful I am. that was giving me such a headache. Thank you very much Flip!
 Asura.Carrotchan
Leonardo da Clippi
Offline
Server: Asura
Game: FFXI
Posts: 1463
By Asura.Carrotchan 2016-09-11 17:33:32
Link | Quote | Reply
 
Spicyryan said:
Have an issue with my gearswap I am not quite sure how to address. Anytime I am below 50% MP my Fucho-no-Obi is supposed to come on while idle.

The issue is this prevents me from using warp or escha ring below 50%, and more importantly if I am nuking below 50% MP then it will equip my idle set instead of my nuking set while entering midcast. -_-

Halp prz?!

Lua:
http://pastebin.com/aw7NAt9s
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-11 18:11:45
Link | Quote | Reply
 
That's something that should just be handled in your IdleState() function, which you should be calling from your aftercast too (in this case, the function ac_Global()). player.mpp will return your current MP percentage.

There's not really much reason to have it automatically equip when your MP hits less than 50%, because the only way that could happen and you aren't passing through that function is if you unweaken or have some sort of -MP tick and never take an action, the former of which you can address through buff change.
 Asura.Carrotchan
Leonardo da Clippi
Offline
Server: Asura
Game: FFXI
Posts: 1463
By Asura.Carrotchan 2016-09-11 18:30:19
Link | Quote | Reply
 
Ragnarok.Flippant said: »
That's something that should just be handled in your IdleState() function, which you should be calling from your aftercast too (in this case, the function ac_Global()). player.mpp will return your current MP percentage.

There's not really much reason to have it automatically equip when your MP hits less than 50%, because the only way that could happen and you aren't passing through that function is if you unweaken or have some sort of -MP tick and never take an action, the former of which you can address through buff change.

Spicyryan said:
Egh, I am not that great at doing GS, I just try my best and things like this are the result :|

Not sure how to make this happen.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-11 18:41:45
Link | Quote | Reply
 
Change the ac_Global() function to:
Code
function ac_Global()
    if LockGearIndex == true then
        ChangeGear(LockGearSet)
        msg("Lock Gear is ON -- Swapping Gear")
    else
        if player.status == 'Engaged' then
            EngagedState()
        else
            IdleState()
        end
    end
end

This will help standardize your functions, so that if you ever edit how you want to handle idle and engaged gear, you can do it from the IdleState() and EngagedState() functions respectively, and it will work regardless of whether you changed status or just casted something.

Then change your IdleState() function to:
Code
function IdleState()
	ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
    if player.mpp <= 50 then
        ChangeGear({waist = "Fucho-no-obi"})
    end
end

Lastly, remove the MPP event (lines 15-21).
[+]
 Asura.Carrotchan
Leonardo da Clippi
Offline
Server: Asura
Game: FFXI
Posts: 1463
By Asura.Carrotchan 2016-09-11 18:52:35
Link | Quote | Reply
 
Ragnarok.Flippant said: »
Change the ac_Global() function to:
Code
function ac_Global()
    if LockGearIndex == true then
        ChangeGear(LockGearSet)
        msg("Lock Gear is ON -- Swapping Gear")
    else
        if player.status == 'Engaged' then
            EngagedState()
        else
            IdleState()
        end
    end
end

This will help standardize your functions, so that if you ever edit how you want to handle idle and engaged gear, you can do it from the IdleState() and EngagedState() functions respectively, and it will work regardless of whether you changed status or just casted something.

Then change your IdleState() function to:
Code
function IdleState()
	ChangeGear(sets.Idle[sets.Idle.index[Idle_ind]])
    if player.mpp <= 50 then
        ChangeGear({waist = "Fucho-no-obi"})
    end
end

Lastly, remove the MPP event (lines 15-21).

Spicy said:
Tyvm :D

One last issue that is more an annoyance than an issue.

Sometimes I get a conflict with the distance check on line 192:
attempt to compare number with nil

It is more annoying that anything since it causes no problems, it is random, sometimes rare, but it happens. :| Any suggestions for that?
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-11 18:56:45
Link | Quote | Reply
 
Probably happens if you accidentally try to WS with no target. You can change the condition to
Code
elseif player.tp >= 1000 and player.target and player.target.distance and player.target.distance > 6 and spell.type == 'WeaponSkill' then
[+]
 Asura.Carrotchan
Leonardo da Clippi
Offline
Server: Asura
Game: FFXI
Posts: 1463
By Asura.Carrotchan 2016-09-11 19:00:38
Link | Quote | Reply
 
Ragnarok.Flippant said: »
Probably happens if you accidentally try to WS with no target. You can change the condition to
Code
elseif player.tp >= 1000 and player.target and player.target.distance and player.target.distance > 6 and spell.type == 'WeaponSkill' then

TY :D
 Asura.Azagarth
Offline
Server: Asura
Game: FFXI
user: Azagarth
Posts: 1326
By Asura.Azagarth 2016-09-12 18:15:49
Link | Quote | Reply
 
Having an issue with my drk lua. I am trying to get my berserkers torque to auto equip when slept. I borrowed what I have from a war lua, but i dont think that should impact this at all. I have been testing and it just will not equip the dang torque when I am slept.

My code is messy but its at the end.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-12 18:34:54
Link | Quote | Reply
 
Well, I can't tell you exactly why it won't work, but since you are using Mote's, you would not want to use that function as it is (you'd be overwriting some of Mote's code).

You would want to incorporate the rules into your job_buff_change function. (I recommend declaring state.Buff.Sleep = buffactive[sleep] or nil inside your user_setup function for reasons addressed below)
Code
function job_buff_change(buff, gain)
    if state.Buff[buff] ~= nil then
        state.Buff[buff] = gain
    end
    if buff:lower()=='sleep' then
        if gain and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep
            equip({neck="Berserker's Torque"})
        elseif not gain then -- Take Berserker's off
            handle_equipping_gear(player.status)
        end
    end
end

But note that if you're only putting it in your buff_change function, it's possible that you'll get changed out of it before it has time to proc. So you may also want to customize your melee set in consideration.
Code
function customize_melee_set(meleeSet)
    if state.Buff.Sleep and player.hp > 120 and player.status == "Engaged" then -- Equip Berserker's Torque When You Are Asleep
        meleeSet = set_combine(meleeSet,{neck="Berserker's Torque"})
    end
    return meleeSet
end
 Asura.Azagarth
Offline
Server: Asura
Game: FFXI
user: Azagarth
Posts: 1326
By Asura.Azagarth 2016-09-12 19:23:02
Link | Quote | Reply
 
working now thanks :D doesnt seem to hit 100% but dang close enough for me .
 Fenrir.Vazerus
Offline
Server: Fenrir
Game: FFXI
user: Vazerus
Posts: 263
By Fenrir.Vazerus 2016-09-14 17:32:01
Link | Quote | Reply
 
Having an issue with my BLU gearswap; when not engaged my diffusion mighty guard lasts 4-5 minutes OR 3 minutes occasionally. While engaged 90% of the time it's only 3 minutes. I'm really coding illiterate, so I was wondering if someone can point out what I screwed up? I took the base .lua from Prothescar's BLU guide.

I would also appreciate if someone better at formatting could maybe make it cleaner too? Again, being coding illiterate, it's a big copy/pasta job. I don't actually use the MB or Weather stuff since I don't have the actual gear to do that, so you can just ignore that section.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-14 17:48:11
Link | Quote | Reply
 
The buffactive table isn't updated until the client gets the buff gain message, which seems to occur a little late, so if you cast too soon after using Diffusion, there is a strong chance that buffactive.Diffusion will return false.

Instead, you can set a variable to true from your aftercast function. You know that if you use "Diffusion," then you have Diffusion on. You can put this in your aftercast:
Code
if spell.english=="Diffusion" and not spell.interrupted then
    diffusion = true
end

Of course, at some point you have to set it to false, but the timing on this isn't nearly as important as when it's true, so we can use the buff_change function for that.
Code
function buff_change(buff,gain,buff_table)
    if buff:lower()=='diffusion' and not gain then
        diffusion = false
    end
end

Then instead of buffactive["Diffusion"], check for the diffusion variable. Simply replace all the instances you find in your file.
[+]
 Asura.Nazantia
Offline
Server: Asura
Game: FFXI
user: Nazantia
Posts: 19
By Asura.Nazantia 2016-09-14 19:55:11
Link | Quote | Reply
 
Fisher here. I made my town set equip my fishing gear and I added all of the ferry areas to areas.Cities = S{ to equip town gear when idle, so if I fight an elemental for a cluster or pull up a monster when not paying attention, I go back to fishing gear when disengaged.

This was nice and all, but it doesn't work for non-ferry area fishing. So then I made a new set in global file and added to a macro to fish with //gs equip sets.precast.Fishing; /fish

Still not optimal. I prefer fishing from menu, macros are clunky. Is there a precast function for fishing or a way I can create one? :o Thanks and thank you, everyone who have helped others with their gearswap woes in this thread. I love seeing all the help and people using it.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-14 20:36:03
Link | Quote | Reply
 
I'm going to assume you're using Mote's based on the areas.Cities thing.

GS doesn't pick up fishing, so the simplest alternative I can think of is to have a toggle. When set to true or 'Fishing', it will use fishing gear for your idle set.

The easiest way to do that is to add it as another option in your Idle modes. For example:
Code
state.IdleMode:options('Normal','PDT','Fishing')

and have a set called sets.idle.Fishing.

If you don't want to use that—for example because you have different IdleModes for various jobs, so it wouldn't suit your global file well—I might be able to find another solution, but I'll have to take a closer look at his code because what I'm hoping for isn't listed in his documentation.
 Asura.Nazantia
Offline
Server: Asura
Game: FFXI
user: Nazantia
Posts: 19
By Asura.Nazantia 2016-09-14 21:23:26
Link | Quote | Reply
 
Correct, I use mote includes. The modes is a good idea and crossed my mind, I just tend to forget to toggle them. I changed the modes in my luas to default to high acc and pdt idle because I've failed things miserably having forgottento toggle. I'd probably remember to change to fishing but not necessarily to change back
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-14 23:08:00
Link | Quote | Reply
 
I forget to change my toggles all the time too. You could try to add_to_chat the relevant toggles when you status change (like accuracy when you engage, idle mode when you disengage).

I use the text library and have a box on my screen that labels all my variables when they are not set to false or 'normal'. Should be able to do the same for Mote's.

You can try putting something like this in your global file.
Code
texts = require('texts')

function init_vars_box(settings)
    text_settings = {
        pos={x=settings.x,y=settings.y},
        text={font='Segoe UI Symbol',fonts={'sans-serif'},size=10,stroke={width=1,alpha=255,red=0,green=0,blue=0}},
        padding=6,
        bg={visible=true,alpha=100,red=0,green=0,blue=0},
        flags={draggable=false,right=settings.right_align or false,bottom=settings.bottom_align or false,bold=true},
    }

    vars = texts.new(text_settings)
    vars:show()
    update_vars_box()
end

function update_vars_box()
    local tags = L{}
    local info = {}

    for label,m in pairs(state) do
        if m.value and m.value ~= 'Normal' then
            tags:append('${'..label..'}')
            info[label] = '[\\cs(255,125,255)'..label..'\\cr] '..m.current..''
        end
    end

    vars:clear()
    vars:append(tags:concat('     '))

    vars:update(info)
end

And then you can initialize it (either in your global file, after those functions are created, or in the individual job files, from user_setup). For example, my settings:
Code
init_vars_box({x=-285,y=-230,right_align=true,bottom_align=true})

But you'd need to find a place to update that box. Probably using this, which I'm pretty sure you could put in your global if you wanted to (but then you might overwrite it in your particular job files).
Code
function job_handle_equipping_gear(status, eventArgs)
    update_vars_box()
end

I didn't test this, so if you try to use it and there is an error, let me know (and post the files involved).
 Leviathan.Stamos
Offline
Server: Leviathan
Game: FFXI
user: Stamos
Posts: 1239
By Leviathan.Stamos 2016-09-15 14:00:22
Link | Quote | Reply
 
Think I am derping a bit.

Wrote this into my LUA but it just keeps it equipped instead of swapping


if world.time >= (7*60) or world.time <= (17*60) then -- Equip Lycopodium Sash From Dawn To Dusk --
equipSet = set_combine(equipSet,{waist="Lycopodium Sash"})
end
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-09-15 14:25:25
Link | Quote | Reply
 
Leviathan.Stamos said: »
Think I am derping a bit.

Wrote this into my LUA but it just keeps it equipped instead of swapping


if world.time >= (7*60) or world.time <= (17*60) then -- Equip Lycopodium Sash From Dawn To Dusk --
equipSet = set_combine(equipSet,{waist="Lycopodium Sash"})
end
The entire function would be helpful.
 Leviathan.Stamos
Offline
Server: Leviathan
Game: FFXI
user: Stamos
Posts: 1239
By Leviathan.Stamos 2016-09-15 14:56:02
Link | Quote | Reply
 
Ty!
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-15 16:11:12
Link | Quote | Reply
 
Not sure I understand what the problem is.

Are you saying that you're not changing belt from Lycopodium at all? (i.e. it stays on during spells, and while engaged?)
Or that regardless of what time it is, your idle set equips it?
Or that if the time changes while you are idle, you are not automatically switched out of it?


Edit: Oh, I'm silly, it's a daytime thingy. The conditions need to be 'and', not 'or'.
 Leviathan.Stamos
Offline
Server: Leviathan
Game: FFXI
user: Stamos
Posts: 1239
By Leviathan.Stamos 2016-09-15 17:04:30
Link | Quote | Reply
 
lol thanks. Yeah, it was equipping idle at night time
 Ramuh.Austar
Offline
Server: Ramuh
Game: FFXI
user: Austar
Posts: 10481
By Ramuh.Austar 2016-09-17 23:38:29
Link | Quote | Reply
 
Is debugmode busted? Tried to use it and it started spouting stuff about my items not having a jobs field in resources.
 Odin.Lygre
Offline
Server: Odin
Game: FFXI
user: Dylaudid
Posts: 89
By Odin.Lygre 2016-09-18 04:10:04
Link | Quote | Reply
 
Code
--Copyright (c) 2013~2016, Byrthnoth
--All rights reserved.

--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are met:

--    * Redistributions of source code must retain the above copyright
--      notice, this list of conditions and the following disclaimer.
--    * Redistributions in binary form must reproduce the above copyright
--      notice, this list of conditions and the following disclaimer in the
--      documentation and/or other materials provided with the distribution.
--    * Neither the name of <addon name> nor the
--      names of its contributors may be used to endorse or promote products
--      derived from this software without specific prior written permission.

--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
--ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
--WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
--DISCLAIMED. IN NO EVENT SHALL <your name> BE LIABLE FOR ANY
--DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
--(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
--LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
--ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
--(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-----------------------------------------------------------------------------------
--Name: check_wearable(item_id)
--Args:
---- item_id - Item ID to be examined
-----------------------------------------------------------------------------------
--Returns:
---- boolean indicating whether the given piece of gear can be worn or not
----    Checks for main job / level and race
-----------------------------------------------------------------------------------
function check_wearable(item_id)
    if not item_id or item_id == 0 then -- 0 codes for an empty slot, but Arcon will probably make it nil at some point
    elseif not res.items[item_id] then
        msg.debugging("Item "..item_id.." has not been added to resources yet.")
    -- elseif not res.items[item_id].jobs then -- Make sure item can be equipped by specific jobs (unlike pearlsacks).
    --     msg.debugging('GearSwap (Debug Mode): Item '..(res.items[item_id][language] or item_id)..' does not have a jobs field in the resources.')
    elseif not res.items[item_id].slots then
        -- Item is not equippable
    else
        return (res.items[item_id].jobs[player.main_job_id]) and (res.items[item_id].level<=player.jobs[res.jobs[player.main_job_id].ens]) and (res.items[item_id].races[player.race_id]) and
            (player.superior_level >= (res.items[item_id].superior_level or 0))
    end
    return false
end


Comment out lines 40 and 41 of equip_processing.lua
 Ramuh.Austar
Offline
Server: Ramuh
Game: FFXI
user: Austar
Posts: 10481
By Ramuh.Austar 2016-09-19 16:16:45
Link | Quote | Reply
 
Which file is that?
Offline
Posts: 174
By Takisan 2016-09-27 10:12:49
Link | Quote | Reply
 
Hi, so I searched around for this issue and found a few people that mentioned it but didn't see any solutions mentioned aside from ammo being in wardrobe vs inventory.

Just got wardrobe 3 and put gear in it but gearswap wont swap any gear in wardrobe 3. I restarted windower but did not see any updates that might take into account this change for wardrobe 3&4.

Is there a place in github I can find updated files for this or is there a simple line(s) of code I can change to include wardrobe 3? Thanks.
Offline
Posts: 174
By Takisan 2016-09-27 10:32:34
Link | Quote | Reply
 
Takisan said: »
Hi, so I searched around for this issue and found a few people that mentioned it but didn't see any solutions mentioned aside from ammo being in wardrobe vs inventory.

Just got wardrobe 3 and put gear in it but gearswap wont swap any gear in wardrobe 3. I restarted windower but did not see any updates that might take into account this change for wardrobe 3&4.

Is there a place in github I can find updated files for this or is there a simple line(s) of code I can change to include wardrobe 3? Thanks.

Duh
Miang said: »
For those using Wardrobe 3 and 4. I haven't tested much because I don't have much time, but if you change line 123 of gearswap/equip_processing.lua from:
Code
local inventories = {[0]=items.inventory,[8]=items.wardrobe,[10]=items.wardrobe2}

to:
Code
local inventories = {[0]=items.inventory,[8]=items.wardrobe,[10]=items.wardrobe2,[11]=items.wardrobe3,[12]=items.wardrobe4}

I was able to get GS to equip from wardrobe this way
Edit: remember to do //lua r gearswap after making the change
http://www.ffxiah.com/forum/topic/40815/plugins-broken-via-version-update/77/#reply
 Valefor.Omnys
Offline
Server: Valefor
Game: FFXI
user: omnys
Posts: 1759
By Valefor.Omnys 2016-09-28 22:06:55
Link | Quote | Reply
 
I've been thinking...

Is there any way to add a command like //gs copy [slot] and it copies that to clipboard? Like //gs copy back might give me back={ name="Rudianos's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}} copied to clipboard?

I know about export, and a lot of the time I use export, it's to get the proper transcription of one piece of gear.
 Asura.Azagarth
Offline
Server: Asura
Game: FFXI
user: Azagarth
Posts: 1326
By Asura.Azagarth 2016-09-29 00:23:46
Link | Quote | Reply
 
SO how would I go about writing a rule to where when I am at 3000tp it will not use moonshade on a ws? I dont want it generic I want individually for various ws, aka ishrava on one hit, novio on magic ws, telos on multihit etc.
 Ragnarok.Flippant
Offline
Server: Ragnarok
Game: FFXI
user: Enceladus
Posts: 660
By Ragnarok.Flippant 2016-09-29 05:09:04
Link | Quote | Reply
 
Valefor.Omnys said: »
I've been thinking...

Is there any way to add a command like //gs copy [slot] and it copies that to clipboard? Like //gs copy back might give me back={ name="Rudianos's Mantle", augments={'DEX+20','Accuracy+20 Attack+20','"Dbl.Atk."+10',}} copied to clipboard?

I know about export, and a lot of the time I use export, it's to get the proper transcription of one piece of gear.

Don't believe copying to clipboard is something available in the API.

Asura.Azagarth said: »
SO how would I go about writing a rule to where when I am at 3000tp it will not use moonshade on a ws? I dont want it generic I want individually for various ws, aka ishrava on one hit, novio on magic ws, telos on multihit etc.

Because of what you describe, it'd be easier to just do it the other way around (put those in the sets and equip Moonshade when <2950 or whatever you want the threshold to be. Assuming you intend this for a Mote-based file.
Code
moonshade_WS = S{"Blade: Ten"}

function job_post_precast(spell,action,spellMap,eventArgs)
    if spell.type=="WeaponSkill" then
        if moonshade_WS:contains(spell.english) and player.tp<2950 then
            equip({ear1="Moonshade Earring"})
        end
    end
end

Be mindful if you already have a job_post_precast function in your file and place the contents inside that one.
First Page 2 3 ... 109 110 111 ... 182 183 184
Log in to post.