Gearswap Support Thread

Langues: JP EN DE FR
users online
Forum » Windower » Support » Gearswap Support Thread
Gearswap Support Thread
First Page 2 3 ... 140 141 142 ... 180 181 182
 Cerberus.Drayco
Offline
Serveur: Cerberus
Game: FFXI
user: Drayco
Posts: 347
By Cerberus.Drayco 2018-08-08 09:05:58
Link | Citer | R
 
Sorry if this is a noob question, I'm pretty noob when it comes to GS. I've been searching without much success for a solution to this.

How do people use warp rings without manually equiping them? My idle set constantly takes over when I'm trying to warp out. I can't seem to find any lines of code to use warp ring with a text command or something.
 Shiva.Hiep
Offline
Serveur: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2018-08-09 18:13:19
Link | Citer | R
 
For the function (spell.element == world.day_element or spell.element == world.weather_element), is there another way to just state double weather for all elements?
[+]
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-08-09 23:45:16
Link | Citer | R
 
Shiva.Hiep said: »
(spell.element == world.day_element or spell.element == world.weather_element)
first that is not a function it is part of an if
to answer you question like this
Code
if (spell.element == world.day_element or spell.element == world.weather_element) and S{"Heat waves","Squalls","Sand storms","Gales","Blizzards","Thunderstorms","Stellar glare","Darkness"}:contains(world.weather)
[+]
 Quetzalcoatl.Langly
Offline
Serveur: Quetzalcoatl
Game: FFXI
user: Langly
Posts: 683
By Quetzalcoatl.Langly 2018-08-10 00:00:48
Link | Citer | R
 
Cerberus.Drayco said: »
Sorry if this is a noob question, I'm pretty noob when it comes to GS. I've been searching without much success for a solution to this.

How do people use warp rings without manually equiping them? My idle set constantly takes over when I'm trying to warp out. I can't seem to find any lines of code to use warp ring with a text command or something.

You're still going to have to manually equip it. But the following code will lock it in place until you use it.

With something like this:
Code
-- Note this code requires the code in 'langly_include.lua' to be present.
-- Detects if your lockable gear is equipped and locks said slot. Then determines if it's an enchanted item and if that item has a charge ready or not to re-enable said slot.
function job_handle_equipping_gear(playerStatus, eventArgs)
	local lockables = T{'Mecisto. Mantle', 'Shobuhouou Kabuto', 'Aptitude Mantle', 'Nexus Cape', 'Aptitude Mantle +1', 'Warp Ring', 'Vocation Ring', 'Reraise Earring', 'Capacity Ring', 'Trizek Ring', 'Echad Ring', 'Facility Ring', 'Dim. Ring (Holla)', 'Dim. Ring (Dem)', 'Dim. Ring (Mea)'}
	local watch_slots = T{'ear1','ear2','ring1','ring2','back','head'}

	for _,v in pairs(watch_slots) do
		if lockables:contains(player.equipment[v]) then
			disable(v)
			if has_charges(player.equipment[v]) and (not is_enchant_ready(player.equipment[v])) then
				enable(v)
			end
		else
			enable(v)
		end
	end
end


But for that to work, you would also need the extra functions (I just put these into the Mote-Include as it seemed appropriate.
Code
res = require('resources')
extdata = require('extdata')

-- Item must be equipped for it to return any meaningful value.
function is_enchant_ready(--[[name of item]]item)
	local item_id, item = res.items:find(function(v) if v.name == item then return true end end)
	local inventory = windower.ffxi.get_items()
	local usable_bags = T{'inventory','wardrobe','wardrobe2','wardrobe3','wardrobe4'}
	local itemdata = {}
	
	for i,v in pairs(inventory) do
		if usable_bags:contains(i) then
			for key,val in pairs(v) do
				if type(val) == 'table' and val.id == item_id then
					itemdata = extdata.decode(val)
				end
			end
		end
	end
	
	if itemdata and itemdata.charges_remaining then
		if itemdata.activation_time - itemdata.next_use_time > item.cast_delay then
			return true
		end
	end
	return false
end

function has_charges(--[[name of item]]item)
	local item_id, item = res.items:find(function(v) if v.name == item then return true end end)
	local inventory = windower.ffxi.get_items()
	local bags = T{'inventory','safe','safe2','storage','satchel','locker','sack','case','wardrobe','wardrobe2','wardrobe3','wardrobe4'}
	local itemdata = {}
	
	for i,v in pairs(inventory) do
		if bags:contains(i) then
			for key,val in pairs(v) do
				if type(val) == 'table' and val.id == item_id then
					itemdata = extdata.decode(val)
				end
			end
		end
	end
	
	if itemdata and itemdata.charges_remaining then
		if itemdata.charges_remaining > 0 then
			return true
		end
	end
	return false
end


This code tests if your gear has a usable item (something with enchantments) and if it does (list is in the job handle equipping gear part) it will prevent it from being swapped out until the enchantment isn't ready. (Like you've just used it).
[+]
 Shiva.Hiep
Offline
Serveur: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2018-08-10 08:21:36
Link | Citer | R
 
Carbuncle.Kigensuro said: »
Shiva.Hiep said: »
(spell.element == world.day_element or spell.element == world.weather_element)
first that is not a function it is part of an if
to answer you question like this
Code
if (spell.element == world.day_element or spell.element == world.weather_element) and S{"Heat waves","Squalls","Sand storms","Gales","Blizzards","Thunderstorms","Stellar glare","Darkness"}:contains(world.weather)

I'm trying to apply this to Orpheus's Sash but not sure how since I'm not too familiar with gearswap functions. The best I could come up with was this
Code
if (spell.element == world.day_element and spell.element == world.weather_element) and
             (spell.skill == 'Elemental Magic' and spellMap ~= 'Helix') or string.find(spell.english, 'Cure') then
                equip({waist="Hachirin-no-Obi"})
			elseif spell.skill == 'Elemental Magic' and spell.target.distance < target_distance then
               equip({waist="Orpheus's Sash"})

With this above
Code
target_distance = 14


I tried for an hourish trying to apply your post to the lua, but I could not figure it out. Disclaimer, the coding would make any adept coder gouge their eyes out at its ugliness, but I wanted to show that I made an attempt ):
Code
              if (spell.element == world.day_element and spell.element == world.weather_element
			   or world.weather_element == S{"Heat waves","Squalls","Sand storms","Gales","Blizzards","Thunderstorms","Stellar glare","Darkness"}
			   or buffactive == S{"Firestorm II","Hailstorm II","Windstorm II","Sandstorm II","Thunderstorm II","Rainstorm II","Aurorastorm II","Voidstorm II"}) and
             (spell.skill == 'Elemental Magic' and spellMap ~= 'Helix') or string.find(spell.english, 'Cure') then
                equip({waist="Hachirin-no-Obi"})
			elseif spell.skill == 'Elemental Magic' and spell.target.distance < target_distance then
               equip({waist="Orpheus's Sash"}) 
            end	
I'm trying to make it where Hachirin-no-Obi will equip during day+weather or double weather/storm2, while Orpheus's Sash equipping over Hachirin-no-Obi if only day matches nukes. This might not be most useful to SCHs, but it'd help a bunch for BLU,GEO, and BLM.
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-08-10 09:13:47
Link | Citer | R
 
this is how i get the timing down foe auto equiping my xp/cp rings
Code
--replaces gearswaps item info update function
function gearswap.refresh_item_list(itemlist)
    retarr = gearswap.make_user_table()
    for i,v in pairs(itemlist) do
        if type(v) == 'table' and v.id and v.id ~= 0 then
            if gearswap.res.items[v.id] and gearswap.res.items[v.id][language] and not retarr[gearswap.res.items[v.id][language]] then
                retarr[gearswap.res.items[v.id][language]] = {id=v.id,count=v.count,shortname=gearswap.res.items[v.id][language]:lower(),extdata = gearswap.extdata.decode(v)}
                if gearswap.res.items[v.id][language..'_log'] and gearswap.res.items[v.id][language..'_log']:lower() ~= gearswap.res.items[v.id][language]:lower() then
                    retarr[gearswap.res.items[v.id][language]].longname = gearswap.res.items[v.id][language..'_log']:lower()
                    retarr[gearswap.res.items[v.id][language..'_log']] = retarr[gearswap.res.items[v.id][language]]
                end
            elseif gearswap.res.items[v.id] and gearswap.res.items[v.id][language] then
                retarr[gearswap.res.items[v.id][language]].count = retarr[gearswap.res.items[v.id][language]].count + v.count
            end
        end
    end
    return retarr
end
--gets bag from item
function item_to_bag(name)
    for _,bag in ipairs({"inventory","wardrobe","wardrobe2","wardrobe3","wardrobe4"}) do
        local item = player[bag][name]
        if item then
            return bag
        end
    end
end
--gets the next time you can use given item (in seconds to wait)
--this was built for exp rings
function get_time_to_next_use(item)
    local ex = player[item_to_bag(ring)][ring].extdata
    if ex and ex.charges_remaining >= 1 then
        local item_time = os.time(os.date("!*t", ex.next_use_time))-os.time()
    end
    return item_time
end
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-08-10 09:31:54
Link | Citer | R
 
Shiva.Hiep said: »
Code
              if (spell.element == world.day_element and spell.element == world.weather_element
			   or world.weather_element == S{"Heat waves","Squalls","Sand storms","Gales","Blizzards","Thunderstorms","Stellar glare","Darkness"}
			   or buffactive == S{"Firestorm II","Hailstorm II","Windstorm II","Sandstorm II","Thunderstorm II","Rainstorm II","Aurorastorm II","Voidstorm II"}) and
             (spell.skill == 'Elemental Magic' and spellMap ~= 'Helix') or string.find(spell.english, 'Cure') then
                equip({waist="Hachirin-no-Obi"})
			elseif spell.skill == 'Elemental Magic' and spell.target.distance < target_distance then
               equip({waist="Orpheus's Sash"}) 
            end	
I'm trying to make it where Hachirin-no-Obi will equip during day+weather or double weather/storm2, while Orpheus's Sash equipping over Hachirin-no-Obi if only day matches nukes. This might not be most useful to SCHs, but it'd help a bunch for BLU,GEO, and BLM.
1. world.weather_element is a string so you can not see if it is equal to a table like
Code
S{"Heat waves","Squalls","Sand storms","Gales","Blizzards","Thunderstorms","Stellar glare","Darkness"}

you need to see if the table containes that string like this
Code
S{"Heat waves","Squalls","Sand storms","Gales","Blizzards","Thunderstorms","Stellar glare","Darkness"}:contains(world.weather)


2. buffactive is a table not a string or a number so equal to is usless you need to check it like this
Code
buffactive["Firestorm II"]
(there might be another way you can do this but im not sure)

the best way i could come up with is this (using your code as a base)
Code
local storm_element = function() for i,v in pairs({Fire=589,Ice=590,Wind=591,Earth=592,Lightning=593,Water=594,Light=595,Dark=596,}) do
                                 if buffactive[v] then return i end end end
if (spell.element == world.day_element and spell.element == world.weather_element
   or S{"Heat waves","Squalls","Sand storms","Gales","Blizzards","Thunderstorms","Stellar glare","Darkness"}:contains(world.weather)
   or storm_element == spell.element) and (spell.skill == 'Elemental Magic' and spellMap ~= 'Helix') or string.find(spell.english, 'Cure') then
    equip({waist="Hachirin-no-Obi"})
elseif spell.skill == 'Elemental Magic' and spell.target.distance < target_distance then
   equip({waist="Orpheus's Sash"}) 
end 
[+]
 Shiva.Hiep
Offline
Serveur: Shiva
Game: FFXI
user: Hiepo
Posts: 669
By Shiva.Hiep 2018-08-10 10:37:36
Link | Citer | R
 
It does swap in Hachirin-no-Obi when storm2 is up, but now it swaps to Hachirin-no-Obi for all nukes even if it's not matching storm2.
 Asura.Truece
Offline
Serveur: Asura
Game: FFXI
user: Truece
Posts: 44
By Asura.Truece 2018-08-10 10:52:10
Link | Citer | R
 
Does anyone have an example of equipping/using dimensional rings? I'm trying to equip, disable the slot, wait for the equip-cooldown, and then use the ring. The equip and disable seem to work OK, but the command to use the ring does not.

I have some equip sets defined as such:
Code
	sets.Holla = { ring1 = "Dimensional ring (Holla)" }
	sets.Mea = { ring1 = "Dimensional ring (Mea)" }
	sets.Dem = { ring1 = "Dimensional ring (Dem)" }	


Then, some self_commands (within function self_command()):
Code
-- Use Teleport Ring (Dem, Mea, Holla) --
	if command: lower() == "dem" then --command is: //gs c dem
		add_to_chat(8, '-----Dem ring -----')
		ZoneChange = 'ON'
		send_command('input //gs equip sets.Dem;input //gs disable ring1;wait 9;input /item "Dimensional ring (Dem)" <me>;')
	end
	if command: lower() == "mea" then --command is: //gs c mea
		add_to_chat(8, '-----Mea ring -----')
		ZoneChange = 'ON'
		send_command('input //gs equip sets.Mea;input //gs disable ring1;wait 9;input /item "Dimensional ring (Mea)" <me>;')
	end
	if command: lower() == "holla" then --command is: //gs c holla
		add_to_chat(8, '-----Holla ring -----')
		ZoneChange = 'ON'
		send_command('input //gs equip sets.Holla;input //gs disable ring1;wait 9;input /item "Dimensional ring (Holla)" <me>;')
	end	


And finally, a bit to handle clearing the flags when the zone changes:
Code
-- Automatically changes Idle gears if you zone in or out of town --
windower.register_event('zone change', function()
		--Start Ring Handling
		if ZoneChange == 'ON' then
			--Just used a teleport/warp ring... clear L.Ring
			send_command('input //gs enable ring1')
			equip({ring1="Etana Ring"})
			ZoneChange = 'OFF'
		end
...


With a ring equipped, I can manually type in the '/item "Dimensional ring (xxx)" <me>' command, and it seems to work, but the self_command doesn't always work. I say always, because it has worked a couple of times. But then I'll try again with a different ring command, and it fails.

I completely expect it to be something obvious that I'm overlooking. Anyone have any suggestions?
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-08-11 11:43:23
Link | Citer | R
 
why would you do this
send_command('input //gs equip sets.Dem;input //gs disable ring1;wait 9;input /item "Dimensional ring (Dem)" <me>;')
when this is faster and easier to understand
Code
equip(ring1 = "Dim. Ring (Holla)")
disable("ring1")
send_command('input /item "Dim. Ring (Holla)" <me>')

also the ring names are
"Dim. Ring (Holla)"
"Dim. Ring (Dem)"
"Dim. Ring (Mea)"
not
-tho this should work for equipping but nothing else because ffxi uses the short names in its commands
-if you look in the res/item.lua you will see en= or ja= these are what you should use for names based on your language (en= English, ja= Japanese)
Dimensional ring (Holla)
Dimensional ring (Dem)
Dimensional ring (Mea)
 Asura.Truece
Offline
Serveur: Asura
Game: FFXI
user: Truece
Posts: 44
By Asura.Truece 2018-08-11 22:18:00
Link | Citer | R
 
Because of the delay between when the ring is equipped and when it can be used. I had tried many variations and that I had is just the most recent iteration.
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-08-12 00:03:57
Link | Citer | R
 
Asura.Truece said: »
Because of the delay between when the ring is equipped and when it can be used. I had tried many variations and that I had is just the most recent iteration.
this is the most efficient way i can think of to do the same thing (you might need to adjust the wait time)
Code
    local comArgs = command
    if #comArgs:split(' ') >= 2 then
        comArgs = T(comArgs:split(' '))
    end
    if comArgs[1]:lower() == 'dim' then
        local ring = comArgs[2]:lower():ucfirst()
        --commands are:
        --//gs c dim dem    -for Dimensional ring (Dem)
        --//gs c dim mea    -for Dimensional ring (Mea)
        --//gs c dim holla  -for Dimensional ring (Holla)
        if ring and S{"Dem","Mea","Holla"}:contains(ring) then
            add_to_chat(8, '-----Using Dimensional ring ('..ring..')-----')
            ZoneChange = 'ON'
            equip(ring1 = "Dim. Ring ("..ring..")")
            disable("ring1")
            send_command('wait 9;input /item "Dim. Ring ('..ring..')" <me>')
        end
    end
[+]
 Lakshmi.Reddwarf
Offline
Serveur: Lakshmi
Game: FFXI
user: Reddwarf
Posts: 160
By Lakshmi.Reddwarf 2018-08-12 01:49:32
Link | Citer | R
 
Asura.Truece said: »
Does anyone have an example of equipping/using dimensional rings? I'm trying to equip, disable the slot, wait for the equip-cooldown, and then use the ring. The equip and disable seem to work OK, but the command to use the ring does not.

I have some equip sets defined as such:
Code
	sets.Holla = { ring1 = "Dimensional ring (Holla)" }
	sets.Mea = { ring1 = "Dimensional ring (Mea)" }
	sets.Dem = { ring1 = "Dimensional ring (Dem)" }	


Then, some self_commands (within function self_command()):
Code
-- Use Teleport Ring (Dem, Mea, Holla) --
	if command: lower() == "dem" then --command is: //gs c dem
		add_to_chat(8, '-----Dem ring -----')
		ZoneChange = 'ON'
		send_command('input //gs equip sets.Dem;input //gs disable ring1;wait 9;input /item "Dimensional ring (Dem)" <me>;')
	end
	if command: lower() == "mea" then --command is: //gs c mea
		add_to_chat(8, '-----Mea ring -----')
		ZoneChange = 'ON'
		send_command('input //gs equip sets.Mea;input //gs disable ring1;wait 9;input /item "Dimensional ring (Mea)" <me>;')
	end
	if command: lower() == "holla" then --command is: //gs c holla
		add_to_chat(8, '-----Holla ring -----')
		ZoneChange = 'ON'
		send_command('input //gs equip sets.Holla;input //gs disable ring1;wait 9;input /item "Dimensional ring (Holla)" <me>;')
	end	


And finally, a bit to handle clearing the flags when the zone changes:
Code
-- Automatically changes Idle gears if you zone in or out of town --
windower.register_event('zone change', function()
		--Start Ring Handling
		if ZoneChange == 'ON' then
			--Just used a teleport/warp ring... clear L.Ring
			send_command('input //gs enable ring1')
			equip({ring1="Etana Ring"})
			ZoneChange = 'OFF'
		end
...


With a ring equipped, I can manually type in the '/item "Dimensional ring (xxx)" <me>' command, and it seems to work, but the self_command doesn't always work. I say always, because it has worked a couple of times. But then I'll try again with a different ring command, and it fails.

I completely expect it to be something obvious that I'm overlooking. Anyone have any suggestions?


i dont use Gearswap for my Warp Rings or Teleport rings, i've just added a command to my alias.

alias demring gs disable ring2; input /equip r.ring "Dim. Ring (Dem)"; wait 12; input /item "Dim. Ring (Dem)" <me>; wait 1; gs enable ring2
alias hollaring gs disable ring2; input /equip r.ring "Dim. Ring (Holla)"; wait 12; input /item "Dim. Ring (Holla)" <me>; wait 1; gs enable ring2

i only have the 2 rings right now, thats usually enough to get me around. you could add the 3rd one if u wanted.

i also //send @all //demring and it works perfect.
[+]
 Asura.Truece
Offline
Serveur: Asura
Game: FFXI
user: Truece
Posts: 44
By Asura.Truece 2018-08-13 09:27:50
Link | Citer | R
 
Carbuncle.Kigensuro said: »
Asura.Truece said: »
Because of the delay between when the ring is equipped and when it can be used. I had tried many variations and that I had is just the most recent iteration.
this is the most efficient way i can think of to do the same thing (you might need to adjust the wait time)
Code
    local comArgs = command
    if #comArgs:split(' ') >= 2 then
        comArgs = T(comArgs:split(' '))
    end
    if comArgs[1]:lower() == 'dim' then
        local ring = comArgs[2]:lower():ucfirst()
        --commands are:
        --//gs c dim dem    -for Dimensional ring (Dem)
        --//gs c dim mea    -for Dimensional ring (Mea)
        --//gs c dim holla  -for Dimensional ring (Holla)
        if ring and S{"Dem","Mea","Holla"}:contains(ring) then
            add_to_chat(8, '-----Using Dimensional ring ('..ring..')-----')
            ZoneChange = 'ON'
            equip(ring1 = "Dim. Ring ("..ring..")")
            disable("ring1")
            send_command('wait 9;input /item "Dim. Ring ('..ring..')" <me>')
        end
    end
I ended up using something similar to this and was able to get some fluff out of my LUA. Thanks very much for your help!
 Valefor.Madranta
Offline
Serveur: Valefor
Game: FFXI
user: Madranta
Posts: 89
By Valefor.Madranta 2018-08-15 00:02:41
Link | Citer | R
 
I'm having a strange problem with my WAR lua where my grip is not equipping. If I ever get the in game error "You must have a two-handed weapon equipped [...] to equip a grip." my grip will no longer equip properly in GS. It doesn't seem to be attempting to, since I only get the error once until I've fixed it with the following. It starts working again after I've manually equipped the grip and then zoned. If I just zone, leaving the grip off, it will continue to not work. Conversely, when it is working I can remove my grip, zone, and GS will properly equip it when triggered.

I use Organizer and would run into this problem nearly every time it used /heal after it's done collecting gear. My grip is in my Idle/Resting set but my weapon is not, hence the error. I've bandaid fixed this by having GS equip the 1 WAR weapon I keep in a Wardrobe upon loading.

I'd guess this is a deeper problem than my lua, but Gearswap is about the extent of my coding knowledge so I certainly could be wrong. The full lua can be found below. Thanks in advance for any time spent looking into this.

Madranta_WAR.lua (Google Drive link)
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-08-15 01:10:48
Link | Citer | R
 
Valefor.Madranta said: »
I'm having a strange problem with my WAR lua where my grip is not equipping. If I ever get the in game error "You must have a two-handed weapon equipped [...] to equip a grip." my grip will no longer equip properly in GS. It doesn't seem to be attempting to, since I only get the error once until I've fixed it with the following. It starts working again after I've manually equipped the grip and then zoned. If I just zone, leaving the grip off, it will continue to not work. Conversely, when it is working I can remove my grip, zone, and GS will properly equip it when triggered.

I use Organizer and would run into this problem nearly every time it used /heal after it's done collecting gear. My grip is in my Idle/Resting set but my weapon is not, hence the error. I've bandaid fixed this by having GS equip the 1 WAR weapon I keep in a Wardrobe upon loading.

I'd guess this is a deeper problem than my lua, but Gearswap is about the extent of my coding knowledge so I certainly could be wrong. The full lua can be found below. Thanks in advance for any time spent looking into this.

Madranta_WAR.lua (Google Drive link)
as far as i can tell it is most likely because you have sub equipment in your sets.Idle and sets.TP.Normal that just so happen to be Grips
this is what i think is causing your issue

you do not need them there because when you change weapons you already have your grips included wirth the ones you need for them
 Valefor.Madranta
Offline
Serveur: Valefor
Game: FFXI
user: Madranta
Posts: 89
By Valefor.Madranta 2018-08-15 02:46:28
Link | Citer | R
 
Carbuncle.Kigensuro said: »
Valefor.Madranta said: »
I'm having a strange problem with my WAR lua where my grip is not equipping. If I ever get the in game error "You must have a two-handed weapon equipped [...] to equip a grip." my grip will no longer equip properly in GS. It doesn't seem to be attempting to, since I only get the error once until I've fixed it with the following. It starts working again after I've manually equipped the grip and then zoned. If I just zone, leaving the grip off, it will continue to not work. Conversely, when it is working I can remove my grip, zone, and GS will properly equip it when triggered.

I use Organizer and would run into this problem nearly every time it used /heal after it's done collecting gear. My grip is in my Idle/Resting set but my weapon is not, hence the error. I've bandaid fixed this by having GS equip the 1 WAR weapon I keep in a Wardrobe upon loading.

I'd guess this is a deeper problem than my lua, but Gearswap is about the extent of my coding knowledge so I certainly could be wrong. The full lua can be found below. Thanks in advance for any time spent looking into this.

Madranta_WAR.lua (Google Drive link)
as far as i can tell it is most likely because you have sub equipment in your sets.Idle and sets.TP.Normal that just so happen to be Grips
this is what i think is causing your issue

you do not need them there because when you change weapons you already have your grips included wirth the ones you need for them
Deleting them is a good enough workaround, thanks. I mostly had them in there for the rare NM that strips equipment, but not necessarily your weapon.

That said, forcing the can't equip grip error with an in game equip macro still prevents GS from equipping the grip. It's a minor enough problem that it's probably not worth looking into further.
Offline
Posts: 1
By NamelessNP 2018-08-16 12:45:00
Link | Citer | R
 
I have this issue where Gearswap does nothing when I first login, I have to reload it from the console after I'm in game before it starts working. What would cause this?
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-08-16 20:46:35
Link | Citer | R
 
how can we tell if we do not have your code
Offline
Posts: 8
By dnoons 2018-08-18 11:57:12
Link | Citer | R
 
I've been trying to get Plunderer's Vest +3 to auto-equip/unequip when applicable or not (Ambush bonus when behind mob).
I copied a bunch of code out of a DNC lua (https://github.com/Rikimarueye/Rikis_gearswaps/blob/master/DNC.lua)
I've got it to auto-equip, but now I cannot figure out how to get it to unequip it when not applicable.

Currently, i just have the code swap the gear when facing the mob, because it is easier to check that way.
Most of the code is at the bottom, but check_facing() is also found within other functions, which is noted also.

If anyone has insight or an answer, I greatly appreciate it.
Edit: If you have another way to code this, I'm open to that as well.

Offline
Posts: 703
By Nyarlko 2018-08-18 14:21:05
Link | Citer | R
 
How would I go about adding a conditional equip based on a debuff timer?

Basically, I want to equip Wicce Chausses +1 on the first cast of a -ja, then equip normal macc/mab gear for successive -ja casts until the debuff wears off after 100sec, then repeat the process again.

Would prefer to have it as a 100% GS function rather than tie in to Timers (since I frequently reload that to clear my screen,) in a non-Mote lua file.
 Asura.Phelence
Offline
Serveur: Asura
Game: FFXI
user: Spainmail
Posts: 9
By Asura.Phelence 2018-08-18 16:50:43
Link | Citer | R
 
Asura.Topace said: »
Asura.Topace said: »
I feel like i've been in here alot lately lol.

My gearswap saids Gearswap/Gearswap.lua:118: Missing resources! What is the hell does that mean?
; ; I'm assuming it has something to do with the Error: Failed to read Status, Item_Armor,Item General, Item Weapon?

Having the same problem, and it doesn't appear to be a permission issue. Does anyone know what could cause this?

EDIT: I should note that this is after a fresh install of both FFXI and windower (dev version), on a Win10 system.
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2018-08-19 03:59:23
Link | Citer | R
 
I've had a rather odd issue today.

On two separate occasions, my idlesets on my RUN lua would stop working. Normally they work just fine, and each returns to the proper idleSet depending on which i'm cycled into. However for some reason, it will eventually hang, and idlesets will stop working altogether. It's especially odd because the melee sets, and even conditional arguments within the customize_melee_sets works just fine, but the idle sets will be broken.

I tried a few things to get it working again initially to no avail, then two random things fixed it and I can't for the life of me figure out why.

The first instance was during Omen.

Initially I tried:
1) Reloading the lua (did not work)
2) Reloading Gearswap (Did not work)
3) Reloading Windower (Did not work)
4) Restarting PC (Did not work)
5) using //gs equip sets.idle to manually equip it. (fixed the problem, which is especially weird given it was still persisting after restarting my PC)

Then, later in the day, the issue resurfaced. This time while doing some Carousing Celine with some Linkshell mates.

I tried restarting the lua, restarting Gearswap, and reloading windower, as well as using //gs equip sets.idle to try fixing it to no avail (which frankly had me scratching my head) so then I loaded my brother's lua that was a bit older, just to make sure I hadn't bungled any arguments in the lua. It had the same problem.

This time, I figured maybe the problem was with gearswap itself, so I swapped to RDM in mhuara, and the issue disappeared! Swapped back to RUN, and the lua worked just fine.

I'm going insane! WTH is causing this?
 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2018-08-19 04:58:25
Link | Citer | R
 
Asura.Phelence said: »
Asura.Topace said: »
Asura.Topace said: »
I feel like i've been in here alot lately lol.

My gearswap saids Gearswap/Gearswap.lua:118: Missing resources! What is the hell does that mean?
; ; I'm assuming it has something to do with the Error: Failed to read Status, Item_Armor,Item General, Item Weapon?

Having the same problem, and it doesn't appear to be a permission issue. Does anyone know what could cause this?

EDIT: I should note that this is after a fresh install of both FFXI and windower (dev version), on a Win10 system.

These errors mean you are missing some libraries required for the applet to work properly.

I would say, make sure you aren't missing these:

Mote-Globals.lua
Mote-Include.lua
Mote-Mappings.lua
Motenten-Globals.lua
Mote-SelfCommands.lua
Mote-Utility.lua
Modes.lua

In my case I have these files in the Data folder, and the libs folder, as well as a rev1 folder inside that libs folder. Not sure that they all need to be there, but I don't think it hurts either.

If everything looks like it's in order, try using the non-dev version of Windower.

More specifically, to Topace. That section of the Gearswap.lua contains this argument:
Code
if res.items and res.bags and res.slots and res.statuses and res.jobs and res.elements and res.skills and res.buffs and res.spells and res.job_abilities and res.weapon_skills and res.monster_abilities and res.action_messages and res.skills and res.monstrosity and res.weather and res.moon_phases and res.races then
else
    error('Missing resources!')
end


You are missing resources under:
Program Files/Windower4/res

That's a folder, and you're apparently missing at least one or two lua files from there. It should look like this:

 Asura.Byrne
Offline
Serveur: Asura
Game: FFXI
By Asura.Byrne 2018-08-19 05:57:22
Link | Citer | R
 
Shiva.Hiep said: »
It does swap in Hachirin-no-Obi when storm2 is up, but now it swaps to Hachirin-no-Obi for all nukes even if it's not matching storm2.

The logic of the argument checks out, I'd try adjusting the grouping.

Carbuncle.Kigensuro said: »

local storm_element = function() for i,v in pairs({Fire=589,Ice=590,Wind=591,Earth=592,Lightning=593,Water=594,Light=595,Dark=596,}) do
                                 if buffactive[v] then return i end end end
if (spell.element == world.day_element and spell.element == world.weather_element
   or S{"Heat waves","Squalls","Sand storms","Gales","Blizzards","Thunderstorms","Stellar glare","Darkness"}:contains(world.weather)
   or storm_element == spell.element) and (spell.skill == 'Elemental Magic' and spellMap ~= 'Helix') or string.find(spell.english, 'Cure') then
    equip({waist="Hachirin-no-Obi"})
elseif spell.skill == 'Elemental Magic' and spell.target.distance < target_distance then
   equip({waist="Orpheus's Sash"})
end

The issue might be right after the second ==

You want it to recognize the first condition, being spell.element == world.day_element AND (maybe group the secondary conditions in their own parenthetical)

You may even need to back up and start the argument with the

if ((spell.skill == 'Elemental Magic' and spellMap ~='Helix') or string.find(spell.english, 'Cure')) then
if


Blah blah blah

Which part you start it with shouldn't make a difference to how it ends up working, but it may make it easier to look at, and generally legibility makes finding errors easier.
 Bismarck.Faelar
Offline
Serveur: Bismarck
Game: FFXI
user: Faelar
Posts: 4108
By Bismarck.Faelar 2018-08-21 22:15:35
Link | Citer | R
 
Would it mess my lua up if I had too many functions set up?

Something like this would still work, no?
 Carbuncle.Kigensuro
Offline
Serveur: Carbuncle
Game: FFXI
user: dlsmd
Posts: 93
By Carbuncle.Kigensuro 2018-08-21 23:25:56
Link | Citer | R
 
Bismarck.Faelar said: »
Would it mess my lua up if I had too many functions set up?
no as long as they have different names
functions just allow you to
1. compartmentalize your code
--libs are compartmentalized code so is gearswaps equip(set)
2. allows you to do things that you you cant check in an if
--like for loops
3. allows you to use the same code multiple times in different locations without having to rewrite the same code again and again
--gearswaps equip(set) is a function of this kind
4. it can be used to make it easier to read your code

gearswap just tries to minimize the amount of code you need to write to do the things you want to do

--edited--
 Cerberus.Shadowmeld
Offline
Serveur: Cerberus
Game: FFXI
Posts: 1648
By Cerberus.Shadowmeld 2018-08-22 16:56:07
Link | Citer | R
 
Bismarck.Faelar said: »
Would it mess my lua up if I had too many functions set up?

Something like this would still work, no?

That won’t work for a few reasons.

1 lua doesn’t support function overloading. (Multiple methods with the same name)
2 function overloading, if lua did support it, requires that each signature have distinct parameters.
 Bismarck.Faelar
Offline
Serveur: Bismarck
Game: FFXI
user: Faelar
Posts: 4108
By Bismarck.Faelar 2018-08-26 12:17:24
Link | Citer | R
 
Cerberus.Shadowmeld said: »

That won’t work for a few reasons.

1 lua doesn’t support function overloading. (Multiple methods with the same name)
2 function overloading, if lua did support it, requires that each signature have distinct parameters.

This is what I was originally asking about.
But it *was* working, but now it's not. How to fix it?
 Cerberus.Drayco
Offline
Serveur: Cerberus
Game: FFXI
user: Drayco
Posts: 347
By Cerberus.Drayco 2018-08-27 17:26:47
Link | Citer | R
 
I'm just diving into using Sch GS and I'm having some issues with the self SC. I can only get my level 1 SC to go off in fire mode. No other element will use the second Immanence in either SC1 or SC2. Any idea what's wrong?

Here is the code from my SCH.lua for SC 1.
Code
elseif command == 'skillchain1' then
		if player.target.type ~= "MONSTER" then
			add_to_chat(123,'Abort: You are not targeting a monster.')
		elseif buffactive.silence or buffactive.mute or buffactive.paralysis then
			add_to_chat(123,'You are silenced, muted, or paralyzed, cancelling skillchain.')
		elseif (get_current_strategem_count() + immactive) < 2 then
			add_to_chat(123,'Abort: You have less than two stratagems available.')
		elseif not (state.Buff['Dark Arts']  or state.Buff['Addendum: Black']) then
			add_to_chat(123,'Can\'t use elemental skillchain commands without Dark Arts - Activating.')
			windower.chat.input('/ja "Dark Arts" <me>')
		elseif state.ElementalMode.value ~= nil then
			if not buffactive['Immanence'] then windower.chat.input('/ja "Immanence" <me>') end
			
			if state.ElementalMode.value == 'Fire' then
				windower.chat.input('/p '..auto_translate('Liquefaction')..' -<t>- MB: '..auto_translate('Fire')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Stone" <t>')
				windower.chat.input:schedule(5,'/ja "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Liquefaction')..' -<t>- MB: '..auto_translate('Fire')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Fire" <t>')
			elseif state.ElementalMode.value == 'Wind' then
				windower.chat.input('/p '..auto_translate('Detonation')..' -<t>- MB: '..auto_translate('wind')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Stone" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Detonation')..' -<t>- MB: '..auto_translate('wind')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Aero" <t>')
			elseif state.ElementalMode.value == 'Lightning' then
				windower.chat.input('/p '..auto_translate('Impaction')..' -<t>- MB: '..auto_translate('Thunder')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Water" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Impaction')..' -<t>- MB: '..auto_translate('Thunder')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Thunder" <t>')
			elseif state.ElementalMode.value == 'Light' then
				windower.chat.input('/p '..auto_translate('Transfixion')..' -<t>- MB: '..auto_translate('Light')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Noctohelix" <t>')
				windower.chat.input:schedule(6,'/ma "Immanence" <me>')
				windower.chat.input:schedule(7,'/p '..auto_translate('Transfixion')..' -<t>- MB: '..auto_translate('Light')..' <scall21> CLOSE!')
				windower.chat.input:schedule(7,'/ma "Luminohelix" <t>')
			elseif state.ElementalMode.value == 'Earth' then
				windower.chat.input('/p '..auto_translate('Scission')..' -<t>- MB: '..auto_translate('earth')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Fire" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Scission')..' -<t>- MB: '..auto_translate('earth')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Stone" <t>')
			elseif state.ElementalMode.value == 'Ice' then
				windower.chat.input('/p '..auto_translate('Induration')..' -<t>- MB: '..auto_translate('ice')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Water" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Induration')..' -<t>- MB: '..auto_translate('ice')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Blizzard" <t>')
			elseif state.ElementalMode.value == 'Water' then
				windower.chat.input('/p '..auto_translate('Reverberation')..' -<t>- MB: '..auto_translate('Water')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Stone" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Reverberation')..' -<t>- MB: '..auto_translate('Water')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Water" <t>')
			elseif state.ElementalMode.value == 'Dark' then
				windower.chat.input('/p '..auto_translate('Compression')..' -<t>- MB: '..auto_translate('Darkness')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Blizzard" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Compression')..' -<t>- MB: '..auto_translate('Darkness')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Noctohelix" <t>')
			else
				add_to_chat(123,'Abort: '..state.ElementalMode.value..' is not an Elemental Mode with a skillchain1 command!')
			end
		end


and SC2
Code
elseif command == 'skillchain2' then
		if player.target.type ~= "MONSTER" then
			add_to_chat(123,'Abort: You are not targeting a monster.')
		elseif buffactive.silence or buffactive.mute or buffactive.paralysis then
			add_to_chat(123,'You are silenced, muted, or paralyzed, cancelling skillchain.')
		elseif (get_current_strategem_count() + immactive) < 2 then
			add_to_chat(123,'Abort: You have less than two stratagems available.')
		elseif not (state.Buff['Dark Arts']  or state.Buff['Addendum: Black']) then
			add_to_chat(123,'Can\'t use elemental skillchain commands without Dark Arts - Activating.')
			windower.chat.input('/ja "Dark Arts" <me>')
			
			
		elseif state.ElementalMode.value ~= nil then
			if not buffactive['Immanence'] then windower.chat.input('/ja "Immanence" <me>') end
			
			if state.ElementalMode.value == 'Fire' or state.ElementalMode.value == 'Light' then
				windower.chat.input('/p '..auto_translate('Fusion')..' -<t>- MB: '..auto_translate('Fire')..' '..auto_translate('Light')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Fire" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Fusion')..' -<t>- MB: '..auto_translate('Fire')..' '..auto_translate('Light')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Thunder" <t>')
			elseif state.ElementalMode.value == 'Wind' or state.ElementalMode.value == 'Lightning' then
				windower.chat.input('/p '..auto_translate('Fragmentation')..' -<t>- MB: '..auto_translate('wind')..' '..auto_translate('Thunder')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Blizzard" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Fragmentation')..' -<t>- MB: '..auto_translate('wind')..' '..auto_translate('Thunder')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Water" <t>')
			elseif state.ElementalMode.value == 'Earth' or state.ElementalMode.value == 'Dark' then
				windower.chat.input('/p '..auto_translate('Gravitation')..' -<t>- MB: '..auto_translate('earth')..' '..auto_translate('Darkness')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Aero" <t>')
				windower.chat.input:schedule(5,'/ma "Immanence" <me>')
				windower.chat.input:schedule(6,'/p '..auto_translate('Gravitation')..' -<t>- MB: '..auto_translate('earth')..' '..auto_translate('Darkness')..' <scall21> CLOSE!')
				windower.chat.input:schedule(6,'/ma "Noctohelix" <t>')
			elseif state.ElementalMode.value == 'Ice' or state.ElementalMode.value == 'Water' then
				windower.chat.input('/p '..auto_translate('Distortion')..' -<t>- MB: '..auto_translate('ice')..' '..auto_translate('Water')..' <scall21> OPEN!')
				windower.chat.input:schedule(1,'/ma "Luminohelix" <t>')
				windower.chat.input:schedule(7,'/ma "Immanence" <me>')
				windower.chat.input:schedule(8,'/p '..auto_translate('Distortion')..' -<t>- MB: '..auto_translate('ice')..' '..auto_translate('Water')..' <scall21> CLOSE!')
				windower.chat.input:schedule(8,'/ma "Stone" <t>')
			else
				add_to_chat(123,'Abort: '..state.ElementalMode.value..' is not an Elemental Mode with a skillchain1 command!')
			end
			

		end
First Page 2 3 ... 140 141 142 ... 180 181 182
Log in to post.